<template>
  <div>
    <nav-bar>
      <img
        class="left"
        slot="left"
        src="../../../assets/img/navbar/ic_title_back.png"
        alt=""
        @click="$router.back()"
      />
      <span slot="center">提现详情</span>
    </nav-bar>
    <div class="content_scroll">
      <div class="data_title">
        <div class="img_icon">
          <img
            v-if="info.banktype === '2'"
            src="../../../assets/img/withdrawal/ic_list_alipay.png"
            alt=""
          />
          <img
            v-else
            src="../../../assets/img/withdrawal/ic_list_unionpay.png"
            alt=""
          />
        </div>
        <div class="title_text">{{ info.bankname }}提现（{{ info.account }}）</div>
      </div>
      <div class="data_amount">{{info.amount}}</div>
      <div class="data_status">
        <span v-if="info.status === '1'" style="color: #777777">审核中</span>
        <span v-else style="color: #33cc33">已完成</span>
      </div>
      <ul class="content_box">
        <li>
          <span>提现说明：</span>
          <span class="text_bold">{{info.bankname}}快速提现</span>
        </li>
        <li>
          <span>处理进度：</span>
          <div class="steps">
            <div class="steps_list">
              <img class="icon_line_top" src="../../../assets/img/withdrawal/ic_is_ok_line_check.png" alt="">
              <div class="steps_icon">
                <img src="../../../assets/img/withdrawal/ic_is_ok_checked.png" alt="">
              </div>
              <span class="step_text">申请提现</span>
              <span>{{info.addtime | fnTime}}</span>
            </div>
            <div class="steps_list">
              <div class="icon_line_down">
                <img v-if="info.status === '2'" class="icon_line_top" src="../../../assets/img/withdrawal/ic_is_ok_line_check.png" alt="">
                <img v-else class="icon_line_top" src="../../../assets/img/withdrawal/ic_is_ok_line_normal.png" alt="">
              </div>
              <div class="steps_icon">
                <img src="../../../assets/img/withdrawal/ic_is_ok_checked.png" alt="">
              </div>
              <span class="step_text">提现处理中</span>
              <span>{{info.addtime | fnTime}}</span>
            </div>
            <div class="steps_list">
              <div class="steps_icon">
                <img v-if="info.status === '2'" src="../../../assets/img/withdrawal/ic_is_ok_checked.png" alt="">
                <img v-else src="../../../assets/img/withdrawal/ic_is_ok_normal.png" alt="">
              </div>
              <div class="step_text">
                <span v-if="info.status === '2'">提现成功</span>
                <span v-else style="color: #777777">等待审核</span>
              </div>
              <span v-if="info.status === '2'">{{info.remittancetime | fnTime}}</span>
            </div>
          </div>
        </li>
        <li>
          <span>提现到：</span>
          <span class="text_bold">{{info.bankname}}({{info.account}})</span>
        </li>
        <li>
          <span>申请提现时间：</span>
          <span class="text_bold">{{info.addtime | fnDate}}</span>
        </li>
        <li>
          <span>提现成功时间：</span>
          <div>
            <span class="text_bold" v-if="info.status === '2'">{{info.remittancetime | fnDate}}</span>
            <span v-else style="color: #777777">审核中</span>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import NavBar from '../../../components/common/navbar/NavBar.vue';
import jutils from 'jutils-src'

export default {
  components: { NavBar },
  data() {
    return {
      info: {},
    };
  },
  created() {
    this.info = this.$route.query.info;
  },
  filters: {
    fnDate: function(date) {
      // YYYY-MM-DD HH:ii:ss
      return jutils.formatDate(new Date(date*1000),"YYYY-MM-DD HH:ii:ss")
    },
    fnTime: function(date) {
      // YYYY-MM-DD HH:ii:ss
      return jutils.formatDate(new Date(date*1000),"MM-DD HH:ii")
    }
  }
};
</script>

<style scoped>
.left {
  width: 44px;
  height: 44px;
}

.data_title {
  padding-top: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img_icon {
  width: 44px;
  height: 44px;
}

.img_icon img {
  width: 44px;
  height: 44px;
}

.title_text {
  font-size: 24px;
  color: #222;
  padding-left: 20px;
}

.data_amount {
  padding-top: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 70px;
  line-height: 100px;
}

.data_status {
  padding: 50px 0 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.content_box {
  padding: 0 40px;
}

.content_box li {
  font-weight: 400;
  padding: 33px 0;
  font-size: 24px;
  color: #787878;
  display: flex;
  justify-content: space-between;
}

.steps {
  width: 400px;
  height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.steps_list {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.steps_icon {
  position: absolute;
  top: -5px;
  left: -65px;
  width: 40px;
  height: 40px;
}

.steps_icon img {
  width: 40px;
  height: 40px;
}

.step_text {
  font-size: 28px;
  color: #33cc33;
}

.text_bold {
  color: #222;
}

.icon_line_top {
  position: absolute;
  width: 3px;
  height: 53px;
  top: 34px;
  left: -47px;
}

.icon_line_down {
  position: absolute;
  width: 3px;
  height: 53px;
  top: 0px;
  left: 0px;
}
</style>
